import maya.cmds as cmds;
import maya.mel;

fudge = 0.1;
holeDiameter = 3.7084;#6 screw chart width
oldHoleDiameter = 3.0;
newHoleDiameter = holeDiameter + fudge;
ratio = newHoleDiameter / oldHoleDiameter;

cmds.SelectAll();
cmds.Delete();

cmds.file('C:/Users/Santiago/Documents/maya/scripts/customMount.STL',i=True);

cmds.SelectAll();
motorMount = cmds.ls(sl=True)#work around for the fact twhat non polys don't have curve3[0] format
cmds.select(motorMount[0]);
cmds.scale(0.1,0.1,0.1);
cmds.rotate(-90,0,0);

cmds.select("transform1.vtx[911:925]","transform1.vtx[928:935]","transform1.vtx[938:951]","transform1.vtx[1047:1083]","transform1.vtx[1141:1167]","transform1.vtx[1169:1178]");

maya.mel.eval("scale -r -p 0.85cm 0.85cm 0.182025cm 1 " + str(ratio) + " " + str(ratio));

cmds.select("transform1");
cmds.scale(0.1,0.1,0.1);#not sure why this is necessary
cmds.rotate(0,0,0);